#include "qmc2sserverdialog.h"
#include <QApplication>
#include <QSettings>
#include <QTranslator>

int main(int argc, char *argv[])
{
    QApplication a(argc, argv);
    QTranslator translator;
    QSettings *config_ini = new QSettings("config.ini", QSettings::IniFormat, 0); ////参数iniformat是针对ini文件的意思
    QString language = config_ini->value("language").toString();
    delete config_ini;
    if(language == "en")
    {
       translator.load("english2.qm", qApp->applicationDirPath());
       a.installTranslator(&translator);
    }
    QMC2SServerDialog w;
    w.show();

    return a.exec();
}
